package xyz.awesome.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.awesome.demo.service.UserService;

@RestController
public class UserController {
    @Autowired
    UserService userService;
    @RequestMapping("/addUser/{username}/{password}")
    public String addUser(@PathVariable String username, @PathVariable String password){
        userService.addUser(username,password);
        return "success";
    }
}
